<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>职称</title>
  <script src="https://www.jsdelivr.com/package/npm/echarts"></script>
  <script src="https://cdn.bootcdn.net/ajax/libs/echarts/4.8.0/echarts-en.common.js"></script>
  <style>
    #main {
      margin: 0 auto;
      background-color: #fff;
    }
    body{
      background-color: #ccc;
    }
  </style>
</head>

<body>
<div id="back" >
  <div id="main" style="width: 600px;height:400px;"></div>
</div>
  <!-- 为ECharts准备一个具备大小（宽高）的Dom -->

  <script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));
    option = {
      series: [
        {
          name: '面积模式',
          type: 'pie',
          radius: [30, 110],
          center: ['50%', '50%'],
          roseType: 'area',
          label: {
            normal: {
              show: true,
              formatter: '{b}:{c}' + '\n\r' + '({d}%)',
              textStyle: {
                fontWeight: 'normal',
                fontSize: 20
              }
            }
          },
          data: [
            { value: 32, name: '讲师' },
            { value: 21, name: '副教授' },
            { value: 14, name: '教授' },
            { value: 2, name: '博士后' },
            { value: 1, name: '助理研究员' }
          ]
        }
      ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
  </script>

</body>

</html>